<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      tbody > tr:nth-child(odd) {
        background-color: #ccc;
      }

      tbody tr:nth-child(even) {
        background-color: #f1c3c3;
      }

      tbody tr:hover {
        background-color: #f00;
      }
    </style>
  </head>
  <body>
    <table width="700px" border="1">
      <caption>
        学生信息表
      </caption>
      <thead>
        <tr>
          <th>编号</th>
          <th>姓名</th>
          <th>性别</th>
          <th>年龄</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>1</td>
          <td>张兴成</td>
          <td>男</td>
          <td>21</td>
        </tr>
        <tr>
          <td>2</td>
          <td>包鲜兵</td>
          <td>男</td>
          <td>22</td>
        </tr>
        <tr>
          <td>3</td>
          <td>徐静</td>
          <td>女</td>
          <td>18</td>
        </tr>
        <tr>
          <td>4</td>
          <td>雷玉倩</td>
          <td>女</td>
          <td>18</td>
        </tr>
        <tr>
          <td>5</td>
          <td>王鹤彬</td>
          <td>女</td>
          <td>18</td>
        </tr>
      </tbody>
    </table>
  </body>
</html>
